from tornado.database import Connection
import pprint

db = Connection("partnergate-db.ctfzyembxw6x.us-east-1.rds.amazonaws.com", "PartnerGate_db", "root", "bu22g33k")
response = db.get("select count(*) from PartnerGate_db.PartnerGateLookup;")
pprint.pprint(response)

response = db.iter("select * from PartnerGate_db.PartnerGateLookup;")
for row in response:
    pprint.pprint(row)

response = db.iter("show status like '%%Conn%%';")
for row in response:
    pprint.pprint(row)

response = db.iter("show processlist;")
for row in response:
    pprint.pprint(row)

db.close()
